<template>
	<view class="bg-white">
		<view class="flex flex-wrap padding-sm">
			<view class="good-box  shadow-warp"
				v-for="(good, gin) in list"
				:key="gin"
				:style="{
					width: `calc(${100 / column}% - ${gutter}rpx)`,
					margin: `0 ${gutter / 2}rpx ${gutter}rpx`
				}"
			>
				<ViewLeisurely :spu="good"></ViewLeisurely>
			</view>
		</view>
		<uni-load-more :status="loadingType"></uni-load-more>
	</view>
</template>

<script>
import ViewLeisurely from '@/components/box/ViewLeisurely.vue'
import uniLoadMore from '@/components/basics/uni-load-more/uni-load-more.vue';
export default {
	components: {
		ViewLeisurely,
		uniLoadMore
	},
	props:{
		column: {
			type: Number,
			default: 2
		},
		gutter: {
			type: Number,
			default: 30
		},
		list: {
			type: Array,
			default: () => []
		},
		loadingType: {
			type: String,
			default: 'more'
		},
	},
	mounted() {
		console.log(this.list);
	},
}
</script>
<style lang="scss" scoped>
	.good-box{
		border-radius: 16rpx;
	}
</style>

